import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/standardiztion/standard_home_edu_entity.dart';

StandardHomeEduEntity $StandardHomeEduEntityFromJson(Map<String, dynamic> json) {
  final StandardHomeEduEntity standardHomeEduEntity = StandardHomeEduEntity();
  final int? planCount = jsonConvert.convert<int>(json['planCount']);
  if (planCount != null) {
    standardHomeEduEntity.planCount = planCount;
  }
  final int? rate = jsonConvert.convert<int>(json['rate']);
  if (rate != null) {
    standardHomeEduEntity.rate = rate;
  }
  final int? surveyCount = jsonConvert.convert<int>(json['surveyCount']);
  if (surveyCount != null) {
    standardHomeEduEntity.surveyCount = surveyCount;
  }
  final int? textBookCount = jsonConvert.convert<int>(json['textBookCount']);
  if (textBookCount != null) {
    standardHomeEduEntity.textBookCount = textBookCount;
  }
  return standardHomeEduEntity;
}

Map<String, dynamic> $StandardHomeEduEntityToJson(StandardHomeEduEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['planCount'] = entity.planCount;
  data['rate'] = entity.rate;
  data['surveyCount'] = entity.surveyCount;
  data['textBookCount'] = entity.textBookCount;
  return data;
}

extension StandardHomeEduEntityExtension on StandardHomeEduEntity {
  StandardHomeEduEntity copyWith({
    int? planCount,
    int? rate,
    int? surveyCount,
    int? textBookCount,
  }) {
    return StandardHomeEduEntity()
      ..planCount = planCount ?? this.planCount
      ..rate = rate ?? this.rate
      ..surveyCount = surveyCount ?? this.surveyCount
      ..textBookCount = textBookCount ?? this.textBookCount;
  }
}
